home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / CoolMacStacks.sea / Cool Mac Stacks / Building Blocks / Textoid 3.1 (US) / cards.xml < prev    next >
Text File  |  1991-12-17  |  20KB  |  86 lines

  1. card_3055.xml
  2. <?xml version="1.0" encoding="utf-8" ?>
  3. <!DOCTYPE card PUBLIC "-//Apple, Inc.//DTD card V 2.0//EN" "" >
  4. <card>
  5.     <id>3055</id>
  6.     <filler1>0</filler1>
  7.     <bitmap>BMAP_3273.pbm</bitmap>
  8.     <cantDelete> <false /> </cantDelete>
  9.     <showPict> <true /> </showPict>
  10.     <dontSearch> <false /> </dontSearch>
  11.     <owner>2661</owner>
  12.     <link rel="stylesheet" type="text/css" href="stylesheet_2387.css" />
  13.     <part>
  14.         <id>1</id>
  15.         <type>field</type>
  16.         <visible> <true /> </visible>
  17.         <dontWrap> <false /> </dontWrap>
  18.         <dontSearch> <false /> </dontSearch>
  19.         <sharedText> <false /> </sharedText>
  20.         <fixedLineHeight> <true /> </fixedLineHeight>
  21.         <autoTab> <false /> </autoTab>
  22.         <lockText> <true /> </lockText>
  23.         <rect>
  24.             <left>69</left>
  25.             <top>68</top>
  26.             <right>434</right>
  27.             <bottom>252</bottom>
  28.         </rect>
  29.         <style>scrolling</style>
  30.         <autoSelect> <false /> </autoSelect>
  31.         <showLines> <false /> </showLines>
  32.         <wideMargins> <false /> </wideMargins>
  33.         <multipleLines> <false /> </multipleLines>
  34.         <reservedFamily> 0 </reservedFamily>
  35.         <titleWidth>0</titleWidth>
  36.         <icon>0</icon>
  37.         <textAlign>left</textAlign>
  38.         <font>Geneva</font>
  39.         <textSize>9</textSize>
  40.         <textStyle>plain</textStyle>
  41.         <textHeight>12</textHeight>
  42.         <name></name>
  43.         <script></script>
  44.     </part>
  45.     <part>
  46.         <id>5</id>
  47.         <type>button</type>
  48.         <visible> <true /> </visible>
  49.         <reserved5> 0 </reserved5>
  50.         <reserved4> 0 </reserved4>
  51.         <reserved3> 0 </reserved3>
  52.         <reserved2> 0 </reserved2>
  53.         <reserved1> 0 </reserved1>
  54.         <enabled> <true /> </enabled>
  55.         <rect>
  56.             <left>174</left>
  57.             <top>281</top>
  58.             <right>343</right>
  59.             <bottom>311</bottom>
  60.         </rect>
  61.         <style>roundrect</style>
  62.         <showName> <true /> </showName>
  63.         <highlight> <false /> </highlight>
  64.         <autoHighlight> <true /> </autoHighlight>
  65.         <sharedHighlight> <true /> </sharedHighlight>
  66.         <family>0</family>
  67.         <titleWidth>0</titleWidth>
  68.         <icon>0</icon>
  69.         <textAlign>center</textAlign>
  70.         <font>Chicago</font>
  71.         <textSize>12</textSize>
  72.         <textStyle>plain</textStyle>
  73.         <name>Textoid</name>
  74.         <script>on mouseUpTextoid "Test1","cd fld 1",false,"91,69","red"testError the ResultTextoid "Test2","This is a sample of wrapping text, you can edit me."¬¨,"chicago",12,"285,142,385,242","white,blue"testError the Resultset selectedChunk of window "Test2" to "11,16"end mouseUpon TestError Whatif What ‚↠emptythenbeepanswer Whatexit to HyperCardend ifend TestError</script>
  75.     </part>
  76.     <content>
  77.         <layer>card</layer>
  78.         <id>1</id>
  79.         <text><span class="style1">                                           </span><span class="style2">Textoid 3.1</span><span class="style1">                                    </span><span class="style2"> by Fr√©d√©ric RINALDI</span><span class="style1"></span><span class="style3">  and the faithful help of Beno√Æt WIDEMANN for WDEF and CDEF resources</span><span class="style1">                              </span><span class="style2"> IMPORTANT NOTICE</span><span class="style1">  To be more accurate, Textoid 3.0 provides some wording changes. So be aware of this :        Cli</span><span class="style4">cI</span><span class="style9">n</span><span class="style1">Text message has been renamed Cli</span><span class="style9">c</span><span class="style4">kIn</span><span class="style1">Text        </span><span class="style2">selectedText</span><span class="style1"> property has been renamed </span><span class="style2">selectedChunk</span><span class="style1">        </span><span class="style2">selectedText</span><span class="style1"> is a new property that returns the selected text,        not the offset        </span><span class="style2">foreColor</span><span class="style1"> property has been renamed </span><span class="style2">textColor</span><span class="style1"></span><span class="style2">DESCRIPTION</span><span class="style1">  Textoid XCMD displays a full-styled text windoid.</span><span class="style2">SYNTAX</span><span class="style1">       Textoid <WName>[,<text>[,<WStyle>][,<color>] [,<X,Y[,Z,T]>]                   [,<textWrap>][,<FName>] [,<FSize>] [,<FStyle>] [,<FAlign>] ]</span><span class="style2">PARAMETERS</span><span class="style1">   Only first param is needed. Order of params 3 to 10 don‚Äôt matter, since the XCMD is able to recognize them.   </span><span class="style2">WName</span><span class="style1"> is a string giving the windoid name. Many windoids can be opened by using different names.   </span><span class="style2">Text</span><span class="style1"> is the text that will be displayed in the windoid. It can be literal or a field descriptor.      </span><span class="style5">Textoid "Test","This is my text"   Textoid "Test",cd fld 1</span><span class="style1">   If you pass a valid field descriptor enclosed in quotes, HyperCard will not interpret it and Textoid will use the full-styled text of that field rather than its text only. If the descriptor is not valid, Textoid will use it as literal.      </span><span class="style5">Textoid "Test","cd fld 1"</span><span class="style1">   If you want to use the field name, you will use :     </span><span class="style5"> Textoid "Test","cd fld" && quote & "Name" & quote</span><span class="style1">   </span><span class="style2">WStyle</span><span class="style1"> is a string defining the window style. Allowed styles are : plain, zoom, roundRect, rect, shadow, windoid, windoidZoom, bigWindoid, bigWindoidZoom, Rinaldoid, RinaldoidZoom (Rinaldoid is the same as windoid, except that it displays the window title). All window styles are floating, except plain, zoom and roundRect. A windoid or Rinaldoid style window will have small scroll bars, while other styles will use standard size. Default is RinaldoidZoom if Rinaldoid WDEF resource is present, windoidZoom if not found.   </span><span class="style2">Color</span><span class="style1"> is a one or two item string giving the foreground and background color. For each item, allowed values are the standard colors (black, white, blue, red, yellow, cyan, magenta, green), or a three word string corresponding to red, green and blue values (100 5624 28652).</span><span class="style2">   <X,Y[,Z,T]></span><span class="style1"> will be a point or a rect, and will define position and/or size of the windoid. Coordinates are card-relative. If omitted, windoid will appear with standard size at "0,10".   </span><span class="style2">textWrap</span><span class="style1"> is a boolean to wrap (true) or not (false) the text in the windoid. Default is true.   </span><span class="style2">FName</span><span class="style1"> is a string giving the font that will be used. Default is Geneva.   </span><span class="style2">FSize</span><span class="style1"> is a string giving the font size that will be used. Default is 9.   </span><span class="style2">FStyle</span><span class="style1"> is an item(s) string giving the font style(s) that will be used (plain, bold, italic, outline, underline, shadow, condense, extend). Default is Plain.   </span><span class="style2">FAlign</span><span class="style1"> is a string giving the text alignment that will be used (left,right, center). Default is left.   Using "!" and "?" as parameter will return an online help ( copyright and syntax respectively).</span><span class="style2">USING</span><span class="style1">   Textoid is stand alone, no linked resource is needed. Meanwhile, this stack contains a WDEF and a CDEF resource that are recognized by the XCMD if present. The WDEF allows you to have an enhanced windoid-type window displaying a title, while the CDEF is useful to get nice-looking scroll arrows for small scroll bars. So, these resources are optional, and for aesthetic purpose only. If you copy them, their ID can be set to any value but don't change their name. Each window can contain up to 32000 chars.</span><span class="style3">Hint : </span><span class="style1">  If you use a rect of shadow style window, placing it on a card can simulate a smart double-scroll HyperCard field.   If no rectangle param is used, the size of the window will be set according to the font.   With a multiple screen configuration, the windoid will be zoomed on the screen that it is displayed on.   Version 1.1 adds hyperText feature : clicking on a word in the window sends a </span><span class="style5">"ClickInText"</span><span class="style1"> message followed by the clicked word, windoid name, start and end char being clicked, font, size, style and color of text.   If the whole sent string (message + params) exceeds 255 chars, then the string will consist of its first 254 chars, followed by character "..." to signify the overflow (the ellipsis character, not three dot characters, hex C9).</span><span class="style5">on clickInText What,Where,Start,Stop,Font,Size,Style,Clr  if Where is "Test1" and What is ...end clickInText</span><span class="style1">Note : </span><span class="style2">Font</span><span class="style1">, </span><span class="style2">Size</span><span class="style1">, </span><span class="style2">Style</span><span class="style1"> and </span><span class="style2">Color</span><span class="style1"> params can contain many items if the clicked word's text attributes aren't homogeneous.   When a windoid is opened, the </span><span class="style5">"openTextoid" </span><span class="style1">message is sent, followed by the windoid name. This allows you to define window properties before it is shown, since the message can be trapped using a handler :</span><span class="style5">     on openTextoid Which       if Which is "MyWindow" then...     end openTextoid</span><span class="style1"> When a windoid is closed, the </span><span class="style5">"closeTextoid"</span><span class="style1"> message is sent, followed by the windoid name. This message can be trapped using a handler : </span><span class="style5">    on closeTextoid Which       if Which is "MyWindow" then...     end closeTextoid</span><span class="style1">   Release 1.5 now allows full editing of the text with Cut, Copy, Paste and Erase. One new property, </span><span class="style2">lockText</span><span class="style1">, allows you to lock/unlock the content. When a window is created, its text is locked. Like a field, the content must be locked to accept mouseDown events (to enable HyperText). If unlocked, the insertion point is set at the clickLoc.Shortcuts : Command-Click in text locks/unlocks the text                  Option-drag in text lets you move text with  a grabber hand,                  holding shiftKey makes is smoother.                  Command-A selects all text in a windoid (if unlocked)                  Control-Command-P, B, I, U, O, S, C, E change style   Finally, the </span><span class="style5">selectedText</span><span class="style1"> property allows you to select any part of the text. When using ‚Äú</span><span class="style5">set selectedText of window "MyWindow" to "X,Y"</span><span class="style1">‚Äù, the window is brought to the front, the text is automatically unlocked, scrolled to show the insertion point, and you are ready to type in it. You can also get the </span><span class="style5">selectedText</span><span class="style1"> when the window is closed using :</span><span class="style5">    on closeTextoid Which      get selectedText of window Which      put char (item 1 of it) to (item 2 of it) of Text¬¨      of window Which    end closeTextoid</span><span class="style1">   If there is a current selection, all text attributes properties will apply to that selection, not the whole windoid.</span><span class="style3">Hint :</span><span class="style1">   the insertion point will be placed at the end of the text by using :   set selectedText of window MyWindow to 32000   Version 2.1 adds full-styled text support. When a Textoid is displayed, font, style, size and even color are accessible using the existing menus. These act exactly like for HyperCard fields : if there is no current selection in the windoid, menus change the global window properties. Otherwise, only the current selection is changed by choosing a menu item.</span><span class="style3">Hint :</span><span class="style1">   While using scrollbar arrows, holding optionKey down makes scrolling smoother, holding shift reverses the scroll direction.   One important new property has been added : </span><span class="style2">FieldTransfer</span><span class="style1">. It can be set only, and allows you to transfer the full-styled text from the windoid to any existing field. Field descriptor must be enclose in quotes, as it was in the input parameter.</span><span class="style5">   set fieldTransfer of window "Test" to "cd fld 1"</span><span class="style1">PROPERTIES   Like any XWindow, Textoid has properties that can be get and set through HyperTalk.   ‚Äúproperties of window "Textoid"‚Äù will return an item list of all allowed properties :   ‚Ä¢ loc             : windoid's position according to card   ‚Ä¢ visible       : windoid's visibility   ‚Ä¢ text          : windoid's text (quoted field descriptor gives full style)   ‚Ä¢ rect          : windoid's position and size according to card   ‚Ä¢ textFont    : current selection's or windoid's global font   ‚Ä¢ textSize    : current selection's or windoid's global font size   ‚Ä¢ globalLoc   : windoid's position according to screen   ‚Ä¢ globalRect : windoid's position and size according to screen   ‚Ä¢ textAlign  : windoid's text alignment (left,right,center)   ‚Ä¢ textStyle  : current selection's or windoid's global text style (bold,                          italic, outline, underline, shadow, condense, extend)   ‚Ä¢ hScroll      : horizontal scroll value (in pixels)   ‚Ä¢ vScroll      : vertical scroll value (in pixels)   ‚Ä¢ zoom         : zoomed state (in, out)   ‚Ä¢ textColor  : current selection or windoid's global text color                         (black, white, blue, red, yellow, cyan, magenta, green)                         or (red green blue)   ‚Ä¢ backColor : back color (black, white, blue, red, yellow, cyan, magenta,                         green) or (red green blue)   ‚Ä¢ lockText   : text locking (true or false)   ‚Ä¢ selectedChunk: current selection offset (Start[,Stop])   ‚Ä¢ selectedText: current selection text (set allows to replace selected       text in the window by another text)   ‚Ä¢ fieldTransfer: text transfer to any field (set only)   ‚Ä¢ textWrap   : wrapping of text (true or false)   ‚Ä¢ textWidth  : width of text (set has no effect if textWrap = true)</span><span class="style2">ERRORS</span><span class="style1">If an error occurs, external can return :     "Error : Missing window name"     "Error : Text cannot exceed 32000 chars"     "Error : Unrecognized parameter"     "Error : Duplicate window name"     "Error : Empty parameter"     "Error : Window rect defined twice"     "Error : Window loc defined twice"     "Error : Text wrap defined twice"     "Error : Font size defined twice"     "Error : Font name defined twice"     "Error : Font style defined twice"     "Error : Font alignment defined twice"     "Error : Bad text style"     "Error : Unable to create XWindow"     "Error : XWindows not implemented"</span><span class="style2">VERSION HISTORY</span><span class="style1">3.1 :                                                                05/25/91‚Ä¢ fixed set textSize bug3.0 :                                                                04/24/91‚Ä¢ Full Undo now supported‚Ä¢ All text attributes properties now apply to current selection if one‚Ä¢ Added text grabbing with option-click in text‚Ä¢ Holding shift key while using a scrollBar inverses the scrolling direction‚Ä¢ Holding option key while using a scrollBar gives smooth scrolling‚Ä¢ Command-click now also unlocks the text‚Ä¢ Insertion caret placed in text as soon as unlocked, no more second click    needed‚Ä¢ Scrolls are now hidden for non-floating backmost windows‚Ä¢ ForeColor property renamed TextColor‚Ä¢ ClicInText message renamed ClickInText‚Ä¢ selectedText property renamed selectedChunk‚Ä¢ Added selectedText property to get selection's text‚Ä¢ Added style shortcuts (Ctrl-Option P, B, I, U, O, S, C, E)‚Ä¢ Added Alignment items in style menu‚Ä¢ Text Color is passed along with ClicInText message, as well as different    text attributes if there are.‚Ä¢ Default scroll is now fast, slow optional‚Ä¢ Fixed Font and Style menu handling bug‚Ä¢ Window rect calculation tuned to match field rect calculation‚Ä¢ Fixed scroll bar update when end of text is deleted‚Ä¢ Fixed wrapping when text changed from an existing field‚Ä¢ Fixed non-floating window re-activation2.2 :‚Ä¢ Text Font, Size and Style are passed along with ClicInText message.2.1 :‚Ä¢ Clicked word font, size and style are now passed along with clicInText2.1 :‚Ä¢ Textoid supports now full styled text !‚Ä¢ Added fieldTransfer, textWidth and textWrap properties‚Ä¢ Added fore and background color menu items‚Ä¢ Fixed unwanted autoscroll with HyperText‚Ä¢ Wrap property not changed anymore when resizing window‚Ä¢ Default text width is now 3000 for non-wrapping text‚Ä¢ Clipboard is correctly transfered while switching‚Ä¢ Fixed last null char of text bug2.0 :‚Ä¢ enhanced window show/hide handling while switching under MultiFinder‚Ä¢ selection restored when activating non-floating windows‚Ä¢ text font, size and style can now be set using menus‚Ä¢ window ordering now correct when zooming in/out‚Ä¢ fixed random bug coming from bad controlHandle‚Ä¢ window clipboard now transferred only if not empty‚Ä¢ fixed hypertext bug when clicking on last word‚Ä¢ idle sent to card window even while editing windoid's text‚Ä¢ added start and stop char passed along with ClicInText message1.9 :‚Ä¢ changed inContent cursor1.8 :‚Ä¢ Added window style parameter‚Ä¢ Added "openTextoid" message‚Ä¢ Fixed rect/globalRect property to not show window if invisible‚Ä¢ Added support of Rinaldoid WDEF and CDEF1.6 :‚Ä¢ Window title is displayed‚Ä¢ All RBG values available for color‚Ä¢ Added "closeTextoid" message when closing window‚Ä¢ Fixed minor bugs‚Ä¢ Added "selectedText" property‚Ä¢ Added command-A shortcut1.5 :‚Ä¢ full text editing added.1.4 : ‚Ä¢¬†fixed a bug arising on CPUs with no Color QuickDraw1.3 :‚Ä¢ Added color support1.2 :‚Ä¢ fixed word hilighting with wrapping word1.1 :‚Ä¢ fixed visual minor bugs (color GrowBox, multi-screen grow frame)‚Ä¢ added hyperText capabilities‚Ä¢ added properties : globalLoc,globalRect,textAlign,textStyle,hScroll,   vScroll,zoom--------------------------------------------------------------------   All externals included in this stack are FreeWare and may be used in non-commercial software provided the following notice is visibly present :   </span><span class="style2">     Textoid XCMD ¬© Frederic Rinaldi, 1990,1991.</span><span class="style1">    Free for non-commercial use. Use in commercial software subjected to prior acknowledgment and licensing from the author, reachable at the following network addresses:</span><span class="style2">AppleLink: RINALDI1                        CalvaCom : FR10                         Compuserve : 71170,2111</span></text>
  80.     </content>
  81.     <name></name>
  82.     <script>on ClickInText What,Where,Start,Stop,Font,Size,Style,Coloranswer "Word :" && What & return & "Window :" && Where & return¬¨& "Start :" && Start & return & "Stop :" && Stop & return & "Font :"¬¨&& Font & return & "Size :" && Size & return & "Style :" && Style¬¨& return & "Color :" && Colorend ClickInTexton closeTextoid Whatput "You closed window ‚Äú" & What & "‚Äù"end closeTextoid</script>
  83. </card>
  84.  
  85.  
  86.